
package com.work.db.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.*;

@Entity
@Table(name = "EMPLOYER")
public class Employer extends BaseEntity implements Serializable {

	@Transient
	private static final long serialVersionUID = 8403620450986445125L;

	@Column(name = "NAME")
	private String name;

	@Column(name = "SHORTNAME")
	private String shortName;
	
	@OneToMany(mappedBy = "employer")
	private List<Client> clients;

	@OneToMany(mappedBy = "employer", cascade = CascadeType.ALL)
	private List<Rate> rates;

	@OneToMany(mappedBy = "employer", cascade = CascadeType.ALL)
	private List<LeavePerYear> leavesPerYear;

	@OneToMany(mappedBy = "employer")
	private List<WorkDay> workDays;
	
	public Employer() {
		super();
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getShortName()
	{
		return shortName;
	}

	public void setShortName(String shortName)
	{
		this.shortName = shortName;
	}

	public List<Client> getClients()
	{
		return clients;
	}

	public void setClients(List<Client> clients)
	{
		this.clients = clients;
	}

	public List<Rate> getRates()
	{
		return rates;
	}

	public void setRates(List<Rate> rates)
	{
		this.rates = rates;
	}

	public List<LeavePerYear> getLeavesPerYear()
	{
		return leavesPerYear;
	}

	public void setLeavesPerYear(List<LeavePerYear> leavesPerYear)
	{
		this.leavesPerYear = leavesPerYear;
	}

	public List<WorkDay> getWorkDays()
	{
		return workDays;
	}

	public void setWorkDays(List<WorkDay> workDays)
	{
		this.workDays = workDays;
	}

}
